<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateBannersTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('banners', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->bigInteger('agent_id')->index()->comment('代理ID');
            $table->string('image_url', 256)->comment('Banner图片地址');
            $table->string('jump_url', 256)->nullable()->comment('跳转链接');
            $table->string('remark', 64)->nullable()->comment('备注信息');
            $table->integer('sequence')->comment('排序字段');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('banners');
    }
}
